const state = {
	loging: false,
	newmessage: 0,
}

const mutations = {
	SET_LOGING: (state, loging) => {
		if(state.loging != loging) {
			state.loging = loging
		}
	},
	SET_MESSAGE: (state) => {
		state.newmessage++
	},
}

const actions = {
	openLogin({
		commit
	}, data) {
		commit('SET_LOGING', data.loging)
	},
	addmessage({
		commit
	}, data) {
		commit('SET_MESSAGE')
	},
}

export default {
	namespaced: true,
	state,
	mutations,
	actions
}